

import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import elementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// import { fr } from 'element-plus/es/locale'
// 默认使用英语
import zhCn from 'element-plus/es/locale/lang/zh-cn';

// 提供$message全局方法
import { ElMessage } from 'element-plus'

let app = createApp(App);
app.use(elementPlus, {
  locale: zhCn,
});
// 注册element-plus组件库
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.provide('$message', ElMessage);

app.use(router);
app.use(elementPlus);
app.mount('#app');
